import React, { Component } from "react";
import { clinList } from "./api";

class Film extends Component {
  state = {
    cinemaslist:[]
  }
  componentDidMount() {
    this.getListData();
  }
  getListData() {
    clinList({
      cityId: "110100",
      ticketFlag: 1,
      k: 2185957,
    }).then((e) => {
      console.log(e);
      this.setState({
        // .then 是一个异步的微任务
        cinemaslist:e.data.cinemas
      })
    });
  }
  render() {
    return <div>
      <h1>电影院列表</h1>

    </div>;
  }
}

export default Film;
